package pila;

public class PilaArr implements PilaTDA {

	int cant;
	int[] A;
	
	public void Apilar(int e) {
		A[cant]=e;
		cant++;
	}

	
	public void Desapilar() {
		cant--;
	}

	
	public void InicializarPila() {
		cant = 0;
		A = new int[100];
	}

	
	public boolean PilaVacia() {
		return cant==0;		
	}

	
	public int Tope() {
		return A[cant-1];		
	}

}
